package com.ruoyi.stock.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.stock.mapper.KProductRealStockMapper;
import com.ruoyi.stock.domain.KProductRealStock;
import com.ruoyi.stock.service.IKProductRealStockService;

/**
 * 商品库存Service业务层处理
 * 
 * @author lb
 * @date 2024-01-31
 */
@Service
public class KProductRealStockServiceImpl implements IKProductRealStockService 
{
    @Autowired
    private KProductRealStockMapper kProductRealStockMapper;

    /**
     * 查询商品库存
     * 
     * @param id 商品库存主键
     * @return 商品库存
     */
    @Override
    public KProductRealStock selectKProductRealStockById(Long id)
    {
        return kProductRealStockMapper.selectKProductRealStockById(id);
    }

    /**
     * 查询商品库存列表
     * 
     * @param kProductRealStock 商品库存
     * @return 商品库存
     */
    @Override
    public List<KProductRealStock> selectKProductRealStockList(KProductRealStock kProductRealStock)
    {
        return kProductRealStockMapper.selectKProductRealStockList(kProductRealStock);
    }

    /**
     * 新增商品库存
     * 
     * @param kProductRealStock 商品库存
     * @return 结果
     */
    @Override
    public int insertKProductRealStock(KProductRealStock kProductRealStock)
    {
        return kProductRealStockMapper.insertKProductRealStock(kProductRealStock);
    }

    /**
     * 修改商品库存
     * 
     * @param kProductRealStock 商品库存
     * @return 结果
     */
    @Override
    public int updateKProductRealStock(KProductRealStock kProductRealStock)
    {
        return kProductRealStockMapper.updateKProductRealStock(kProductRealStock);
    }

    /**
     * 批量删除商品库存
     * 
     * @param ids 需要删除的商品库存主键
     * @return 结果
     */
    @Override
    public int deleteKProductRealStockByIds(Long[] ids)
    {
        return kProductRealStockMapper.deleteKProductRealStockByIds(ids);
    }

    /**
     * 删除商品库存信息
     * 
     * @param id 商品库存主键
     * @return 结果
     */
    @Override
    public int deleteKProductRealStockById(Long id)
    {
        return kProductRealStockMapper.deleteKProductRealStockById(id);
    }
}
